﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using IBuy.DataAccessLayer;

namespace IBuy.Entity
{
    public class Agency
    {
        private IDatabase database;

        public Agency()
        {
            DatabaseFactory factory = new OledbDatabaseFactory();
            database = factory.GetDatabase();
        }
        public DataSet GetNameAndIdOfAllAgency()
        {
            string sql = "select AGENCYID,AGENCYNAME from AGENCY";
            return database.GetDataSet(sql);
        }
    }
}
